package com.li.o2oSystem.service;

import com.li.o2oSystem.dto.LocalAuthExecution;
import com.li.o2oSystem.entity.LocalAuth;
import com.li.o2oSystem.exceptions.LocalAuthOperationException;

public interface LocalAuthService {
	/**
	 * 通过账号密码获取本地账号
	 * @param username
	 * @param password
	 * @return
	 */
	LocalAuth getLocalAuthByUsernameAndPwd(String username,String password);
	/**
	 * 通过用户id获取本地账号
	 * @return
	 */
	LocalAuth getLocalAuthByUserId(Long userId);
	/**
	 * 绑定微信账号，
	 * @param localAuth
	 * @return
	 */
	LocalAuthExecution bindLocalAuth(LocalAuth localAuth) throws LocalAuthOperationException;
	/**
	 * 修改本地账号登录密码
	 * @param userId
	 * @param username
	 * @param password
	 * @param newPassword
	 * @return
	 */
	LocalAuthExecution modifyLocalAuth(Long userId,String username,String password,String newPassword) throws LocalAuthOperationException;
}
